Repository navigation
[Tabs] Simplify active tab ID handling - #5382
Merged
Merged
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
October 1, 2026 15:16
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused refactor is consistent across implementation and tests with no unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies active tab ID synchronization in FluentTabs.
Changes:
- Removes redundant client-side tracking state.
- Synchronizes
activeidafter user and parameter selections. - Updates and expands tab-selection tests.
| File | Description |
|---|---|
src/Core/Components/Tabs/FluentTabs.razor.cs |
Simplifies active ID state handling. |
tests/Core/Components/Tabs/FluentTabsTests.razor |
Updates synchronization expectations and coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Denis Voituron (dvoituron)
enabled auto-merge (squash)
October 1, 2026 15:21
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.3%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
Vincent Baaij (vnbaaij)
approved these changes
Oct 1, 2026
Denis Voituron (dvoituron)
deleted the
users/dvoituron/fix-tabs-activeid
branch
October 1, 2026 16:34
This was referenced Oct 14, 2026
Closed
Closed
8 of 11 tasks
This was referenced Oct 19, 2026
7 of 10 tasks
This was referenced Oct 19, 2026
Closed
Closed
Evan Li (Nacl-HCl)
added a commit
to Nacl-HCl/fluentui-blazor
that referenced
this pull request
Oct 21, 2026
Restore the pre-microsoft#5382 behavior in SetActiveTabAsync: only a programmatic selection writes the `activeid` attribute. For a client-originated change the web component already displays the selected tab; round-tripping the value through the rendered attribute makes the component raise `tabchange` again, and a stale event (raised while a programmatic value was still being applied) flips the selection back, which the next render echoes again. In nested FluentTabs this alternated the inner activeid indefinitely (microsoft#5468), reproduced in a .NET 10 Interactive Server app using the exact page from the issue; with this change the selection settles on the requested tab. Test contract restored to match: user selection does not rewrite `activeid` (SynchronizesActiveId renamed back to DoesNotRewriteActiveId), the microsoft#5382-added ParameterSelection_ReappliesPreviousValueAfterUserSelection is removed since it relied on the round-trip, and the regression tests added on this branch now assert that client changes update the bound value without rewriting the attribute.
Evan Li (Nacl-HCl)
added a commit
to Nacl-HCl/fluentui-blazor
that referenced
this pull request
Oct 22, 2026
Restore the pre-microsoft#5382 behavior in SetActiveTabAsync: only a programmatic selection writes the `activeid` attribute. For a client-originated change the web component already displays the selected tab; round-tripping the value through the rendered attribute makes the component raise `tabchange` again, and a stale event (raised while a programmatic value was still being applied) flips the selection back, which the next render echoes again. In nested FluentTabs this alternated the inner activeid indefinitely (microsoft#5468), reproduced in a .NET 10 Interactive Server app using the exact page from the issue; with this change the selection settles on the requested tab. Test contract restored to match: user selection does not rewrite `activeid` (SynchronizesActiveId renamed back to DoesNotRewriteActiveId), the microsoft#5382-added ParameterSelection_ReappliesPreviousValueAfterUserSelection is removed since it relied on the round-trip, and the regression tests added on this branch now assert that client changes update the bound value without rewriting the attribute.
This was referenced Oct 28, 2026
Merged
Closed
This was referenced Nov 9, 2026
This was referenced Nov 19, 2026
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Tabs] Simplify active tab ID handling
Refactor the handling of the active tab ID in the
FluentTabscomponent to streamline the logic and improve clarity.This change eliminates unnecessary variables and simplifies the synchronization of the active tab ID.
Example
Before
Before.mp4
After
After.mp4
Unit Tests
Added